//
//  EJSGoodsEvaluateTableViewCell.m
//  EnjoyShoppingStreet
//
//  Created by lifayu on 2017/12/27.
//  Copyright © 2017年 lifayu. All rights reserved.
//

#import "EJSEvaluateTableViewCell.h"
#import "EJSEvaluateModel.h"

@implementation EJSEvaluateTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.ratingBarView setImageDeselected:@"star_1" halfSelected:@"star_2" fullSelected:@"star_2" andDelegate:nil];
    self.ratingBarView.isIndicator = YES;
    [self.ratingBarView displayRating:5];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setEvaluateModel:(EJSEvaluateModel *)evaluateModel{
    [self.userIconImageView setImageWithUrl:evaluateModel.avatar];
    self.nickNameLabel.text = evaluateModel.userName;
    self.dateLabel.text = evaluateModel.orderCreateTime;
    self.contentLabel.text = evaluateModel.content;
    if(evaluateModel.content){
        self.contentTopConstraint.constant = 20;
    }else{
        self.contentTopConstraint.constant = 13;
    }
    [self.ratingBarView displayRating:evaluateModel.star.intValue];
}

@end
